package com.light.sys.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.light.common.mybatisplus.MybatisPlusHelper;
import com.light.common.base.BaseServiceImpl;

import java.io.Serializable;
import java.util.List;

import com.light.sys.query.SysUserQuery;
import com.light.sys.mapper.SysUserMapper;
import com.light.sys.domain.SysUserDO;
import com.light.sys.service.SysUserService;



@Service
public class SysUserServiceImpl extends BaseServiceImpl<SysUserDO, SysUserMapper> implements SysUserService {
	@Autowired
	private SysUserMapper sysUserMapper;
	
	@Override
	public List<SysUserDO> data(SysUserQuery sysUserQuery){
		QueryWrapper<SysUserDO> queryWrapper = MybatisPlusHelper.setQueryWrapperPageParam(sysUserQuery.createQueryWrapper(),sysUserQuery);
		return sysUserMapper.selectList(queryWrapper);
	}
	
	@Override
	public int count(SysUserQuery sysUserQuery){
		return sysUserMapper.selectCount(sysUserQuery.createQueryWrapper());
	}

}
